<%--
  Created by IntelliJ IDEA.
  User: miao
  Date: 2022/11/10
  Time: 18:52
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
  <head>
    <title>展示反馈信息界面</title>
    <link rel="stylesheet" type="text/css" href="css/page.css">
    </style>
  </head>
  <body>
    <table border="1px">
      <caption>广场计划管理页</caption>
      <thead>
      <tr>
        <th>自增主键</th>
        <th>用户id</th>
        <th>用户名称</th>
        <th>点赞数</th>
        <th>分享时间</th>

        <th colspan="2">操作</th>
      </tr>
      </thead>
      <tbody>
      <c:forEach items="${planTableInfoPage.list}" var="planInfo">
        <tr>
          <td>${planInfo.tableId}</td>
          <td>${planInfo.userId}</td>
          <td>${planInfo.userName}</td>
          <td>${planInfo.likeNum}</td>
          <td>${planInfo.sharedTime}</td>

          <td><a href="ShowStudyPlan?tableId=${planInfo.tableId}">查看</a></td>
          <td><a href="DeleteUsersPlanServlet?tableId=${planInfo.tableId}">删除</a></td>
        </tr>
      </c:forEach>
      </tbody>
      <tfoot>
      <div class="page">
        <a href="ShowUsersPlan">首页</a>
        <a href="ShowUsersPlan?num=${planTableInfoPage.prePageNum}">上一页</a>
        <a href="ShowUsersPlan?num=${planTableInfoPage.nextPageNum}">下一页</a>
        <a href="ShowUsersPlan?num=${planTableInfoPage.totalPageNum}">末页</a>
        <select  id="pageSelect" name="pageSelect" onchange="changePage(this.value)">
          <c:forEach var="i" begin="1" end="${planTableInfoPage.totalPageNum}">
            <c:if test="${i == planTableInfoPage.currentPageNum }">
              <option value="${i }" selected="selected">第${i }页</option>
            </c:if>
            <c:if test="${i != planTableInfoPage.currentPageNum }">
              <option value="${i }">第${i }页</option>
            </c:if>
          </c:forEach>
        </select>
      </div>
      </tfoot>
      <script type="text/javascript">
        function changePage(page){
          window.location.href="ShowUsersPlan?num=" + page;
        }
      </script>
    </table>
  </body>
</html>






















